package constant

import "errors"

const (
	CodeSuccess           = 200
	CodeErrBadRequest     = 400
	CodeErrUnauthorized   = 401
	CodeErrNotFound       = 404
	CodeAuth              = 406
	CodeGlobalLoading     = 407
	CodeErrInternalServer = 500
	CodeErrBadGateway     = 502
	CodeErrGatewayTimeout = 504

	CodeErrServiceRequestFailed = 10001
)

// internal
var (
	ErrAuth            = errors.New("ErrAuth")
	ErrRecordExist     = errors.New("ErrRecordExist")
	ErrRecordNotFound  = errors.New("ErrRecordNotFound")
	ErrStructTransform = errors.New("ErrStructTransform")
	ErrInitialPassword = errors.New("ErrInitialPassword")
	ErrNotSupportType  = errors.New("ErrNotSupportType")
	ErrInvalidParams   = errors.New("ErrInvalidParams")
)

// common
var (
	ErrTypeInternalServer = "ErrInternalServer"
	ErrTypeInvalidParams  = "ErrInvalidParams"
	ErrTokenParse         = "ErrTokenParse"
	ErrTokenExpired       = "ErrTokenExpired"
	ErrNoAuthority        = "ErrNoAuthority"
)

// User
var (
	ErrUserPassword = "ErrUserPassword"
	ErrCaptchaCode  = "ErrCaptchaCode"
	ErrUserDisabled = "ErrUserDisabled"
	ErrUserNotFound = "ErrUserNotFound"
)
